1. Field of the Invention
The present invention relates to systems and methods for adaptive bit encoding of digital media streams, and in particular to a system and method for server-side adaptive bit encoding of such streams.
2. Description of the Related Art
The dissemination and playback of media programs has undergone substantial changes in the past decade. Previously, media programs (which may include audio, video, or both) were disseminated either by analog broadcast (conventional, satellite, or cable) or by dissemination of physical copies of the media programs to presentation locations such as theaters. Digital technologies have had a profound effect on the dissemination and playback of media programs.
In particular, digital technology (with improved bandwidth and improved compression/decompression techniques) has permitted the dissemination and playback of media programs via the Internet. These methods of dissemination and playback have become competitive with traditional means. Dissemination of media programs via the Internet may occur either by simple downloading, progressive downloading or streaming.
Simple downloading downloads the bytes of the media file in any convenient order, while progressive download downloads bytes at the beginning of a file and continues downloading the file sequentially and consecutively until the last byte. At any particular time during simple downloading, portions of the file is not be immediately available for playback because the entire file must be downloaded first before a media player can start playback.
With progressive downloading, a media file having the media program is downloaded via the Internet using dial-up, DSL, ADSL, cable, T1, or other high-speed connection. Such downloading is typically performed by a web server via the Internet. Media players are able to start playback once enough of the beginning of the file has downloaded, however, the media player must download enough information to support some form of playback before playback can occur. Playback of progressively downloaded media files is often delayed by slow Internet connections and is also often choppy and/or contains a high likelihood of stopping after only a few seconds. Once a progressively downloaded media program has been completely downloaded, it may be stored on the end-user computer for later use.
One of the disadvantages of a progressive downloading is that the entity transmitting the data (the web server) simply pushes the data to the client as fast as possible. It may appear to be “streaming” the video because the progressive download capability of many media players allows playback as soon as an adequate amount of data has been downloaded. However, the user cannot fast-forward to the end of the file until the entire file has been delivered by the web server, and the web server does not make allowances for the data rate of the video file. For example, if the network bandwidth is lower than the data rate required by the video file, the user would have to wait a longer period of time before playback can begin, and may experience choppy “on and off” playback.
Web servers typically use HTTP (hypertext transport protocol) on top of TCP (transfer control protocol) to transfer files over the network. TCP, which controls the transport of data packets over the network, is optimized for guaranteed delivery of data, not speed. Therefore, if a browser senses that data is missing, a resend request will be issued and the data will be resent. In networks with high delivery errors, resend requests may consume a large amount of bandwidth. Since TCP is not designed for efficient delivery of adequate data or bandwidth control (but rather guaranteed delivery of all data), it is not preferred for the delivery of video data in all applications.
Streaming delivers media content continuously to a media player and media playback occurs simultaneously. The end-user is capable of playing the media immediately upon delivery by the content provider. Traditional streaming techniques originate from a single provider delivering a stream of data to a set of end-users. High bandwidths and central processing unit (CPU) power are required to deliver a single stream to a large audience, and the required bandwidth of the provider increases as the number of end-users increases.
Unlike progressive downloading, streaming media can be delivered on-demand or live. Wherein progressive download requires downloading the entire file or downloading enough of the entire file to start playback at the beginning, streaming enables immediate playback at any point within the file. End-users may skip through the media file to start playback or change playback to any point in the media file. Hence, the end-user does not need to wait for the file to progressively download. Typically, streaming media is delivered from a few dedicated servers having high bandwidth capabilities.
A streaming media server is a specialized device that accepts requests for video files, and with information about the format, bandwidth and structure of those files, can deliver just the amount of data necessary to play the video, at the rate needed to play it. Streaming media servers may also account for the transmission bandwidth and capabilities of the media player. Unlike the web server, the streaming media sever communicates with the client computer using control messages and data messages to adjust to changing network conditions as the video is played.
Streaming media servers may use HTTP and TCP to deliver video streams, but generally use RSTP (real time streaming protocol) and UDP (user datagram protocol). These protocols permit control messages and save bandwidth by reducing overhead. Unlike TCP, when data is dropped during transmission, UDP does not transmit resent requests. Instead, the server continues to send data.
Other streaming protocols that were developed primarily for mobile devices, are also in use. One such protocol is HTTP Live Streaming (HLS). HLS is an HTTP-based media streaming communications protocol implemented by APPLE INC. as a part of their QUICKTIME, SAFARI, OS-X and iOS software. With HLS, the media program is broken down into a sequence of small HTTP-based files, each representing a temporal “chunk” of the media program. For each temporal chunk, a number of different versions are created in advance, each created with different transcoding parameters, and optimized for different transmission bandwidth. As the stream is played, the client may select from one of these alternate chunks (which contain the same material encoded at a variety of data rates), allowing the client to adapt the streaming session to the available data rate. At the start of the streaming session, the client downloads an extended M3U playlist containing the metadata for the various “chunks” that are available. Such formats do not inherently support server-side adaptive bit rate control, even though the need for such adaptive bit rate control in such applications is often greater than it is for non-mobile devices.
Accordingly, there is a need in the art for a method and apparatus for server-side adaptive bit rate control in HLS and similar protocols. Described below is a method and apparatus that satisfies this need.